// Interface for the first parent class
interface ParentInterface1 {
void method1();
}
// Interface for the second parent class
interface ParentInterface2 {
void method2();
}
// Child class that implements both ParentInterface1 and ParentInterface2
class ChildClass implements ParentInterface1, ParentInterface2 {
@Override
public void method1() {
System.out.println("Implementation of method1 from
ParentInterface1");
}
@Override
public void method2() {
System.out.println("Implementation of method2 from
ParentInterface2");
}
}
public class twenty {
public static void main(String[] args) {
ChildClass child = new ChildClass();
child.method1();
child.method2();
}
}